﻿//  Created by Mathew Purchase.
//  Copyright (c) 2014 Mathew Purchase. All rights reserved.

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class terrainPiece : MonoBehaviour 
{
	//---------------------------------------------------------------------------------------------
	// Properties
	public int location_x;
	public int location_y;
	
	public bool generated;
	public bool settled;

	public bool terrainOpen;
	public bool terrainClosed;
	
	
	//---------------------------------------------------------------------------------------------
	// Members
	public GameObject m_terraincontainer;
	public GameObject m_randomEncounterService;

	
	
	//---------------------------------------------------------------------------------------------
	// Events and Delegates
	
	
	//---------------------------------------------------------------------------------------------
	// Init
	
	void OnEnable()
	{
	
	}
	
	//---------------------------------------------------------------------------------------------
	// Core Functions
	

	public void choosepiece_v2(int x, int y)
	{
		if ((settled  ==  true))
		{
			generated = true;
			gameObject.transform.parent = GameObject.Find ("SettlementContainer").transform;
			gameObject.name = "settlement";
		}
		if (terrainOpen == true)
		{
			generated = true;
			gameObject.transform.parent = GameObject.Find ("TerrainContainer").transform;
			gameObject.name = "wilderness";
		}
	}
	
	
	//---------------------------------------------------------------------------------------------
	
	

	
	
	
	
	
	
	
	
	
	

	
	
	
	

	
	
}
